package com.xiaomi.service.impl;

import com.xiaomi.entity.DiZhi;
import com.xiaomi.mapper.DiZhiMapper;
import com.xiaomi.service.DiZhiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName DiZhiServiceImpl
 * @Description TODO
 * @Author lll
 * @Date 2021/11/27 15:47
 * @Version 1.0
 **/
@Service
public class DiZhiServiceImpl implements DiZhiService {

    @Autowired
    private DiZhiMapper diZhiMapper;

    @Override
    public List<DiZhi> pageSearch(Integer startRow, Integer limit, Integer shId, String shName) {
        return diZhiMapper.pageSearch(startRow, limit, shId, shName);
    }

    @Override
    public Integer getCount(Integer shId, String shName) {
        return diZhiMapper.getCount(shId, shName);
    }

    @Override
    public Integer insert(String shName, String sheng, String city, String xiaoqu, String phone) {
        return diZhiMapper.insert(shName, sheng, city, xiaoqu, phone);
    }

    @Override
    public Integer update(String shName, String sheng, String city, String xiaoqu, String phone, Integer shId) {
        return diZhiMapper.update(shName, sheng, city, xiaoqu, phone, shId);
    }

    @Override
    public Integer delete(Integer shId) {
        return diZhiMapper.delete(shId);
    }
}
